home *** CD-ROM | disk | FTP | other *** search
/ PsL Monthly 1993 December / PSL Monthly Shareware CD-ROM (December 1993).iso / prgmming / dos / pascal / gwedit.com / TESTED.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1989-03-16  |  1.0 KB  |  45 lines

  1.  
  2. {released to public domain 3/16/89 by author Michael Day} 
  3.  
  4. program tested; {a program to test GwEdit}
  5.  
  6. uses crti,graph,gstart,gwedit,gwcurse,AreaWr;
  7.  
  8. var A1,X,Y,Wide,CPos : integer;
  9.     Ps,S : string;
  10.     Edit : boolean;
  11.     C : ColorRec;
  12.     Ch : char;
  13.     A : rect;
  14.  
  15.  
  16. {--------------------------------}
  17. begin
  18.   if not grafstart then BombOut(2);
  19.   Edit := true;
  20.   A1 := GetMaxY div 4;
  21.   X := 14*8;
  22.   Y := A1*2 {19*8};
  23.   Wide := 40;
  24.   CPos := 1;
  25.   if DispType = EGADisp then
  26.     SetColorRec(C,OffLeftWrite,yellow,blue,SolidFill)
  27.   else
  28.     SetColorRec(C,OffLeftWrite,white,black,SolidFill);
  29.   SetRect(A,10*8,A1*3,64*8,(A1*3)+8);
  30.  
  31.   outtextxy(35*8,A1,'Hello world');
  32.   GcursorType(NormalGcursor);
  33.     circle(GetMaxX shr 1,GetMaxY shr 1,199);
  34.  
  35.   S := 'Edit this string';
  36.  
  37.   repeat
  38.     Ch := GwRead(X,Y,Wide,Cpos, Edit,C,S);
  39.  
  40.     Ps := 'You entered:'+S;
  41.     AreaWrite(Ps,A,C);
  42.   until Ch = #$1b;
  43.  
  44.   SetGraphOff;
  45. end.